package exercise5;
import javax.swing.JOptionPane;
public class MinIndex {
	public static int minIndex(Integer[] list) {

		int min = list[0];
		int index = 0;
		for (int i = 1; i < list.length; i++) {
			if (list[i] < min) {
				min = list[i];
				index = i;
			}
		}
		JOptionPane.showMessageDialog(null,"最小值为：" + min + "         最小值下标为： " + index);
		return 0;
	}
}
